home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_1 / issue_05 / dumpprogs / rhsourcefn < prev    next >
Encoding:
Text File  |  1987-12-05  |  3.4 KB  |  20 lines

  1.  
  2. ÃPAô > RHsourceFN      : Assembler FN to generate module header.
  3. ÃZ"Ý ¤assemble_MiniDumpAP(start%)
  4. Ãd&ô FN Version 3.00   : 5th Dec 1987
  5. Ãn)ô Copyright         : ABACUS TRAINING
  6. Ãx:
  7. Ãŵ.ê margin,threshold,printmode,sp,pass%,end%
  8. Ã…4ê modulehelp,keywords,moduletitle,readparameters
  9. Ä!ê minparameters,maxparameters
  10. àê badsyntax,keywordhelp
  11. ê5ê margindefault,thresholddefault,printmodedefault
  12. ô<ê fail,badparameters,badmargin,badthreshold,badprintmode
  13. þê Ŷ
  14. ÃÈ/î Ŷ ÿ("FX 3,0"):ï 26,12:ö:ñ " at line ";fi:ú
  15. ÃÒ:
  16. ÃÜ:
  17. Ãæ:
  18. Ãð8ô Choose the default values of the three parameters.
  19. Ãú6margindefault    = 18   :ô Default value of margin
  20. Ä9thresholddefault =  0   :ô Default value of threshold
  21. Ä9printmodedefault =  7   :ô Default value of printmode
  22. Ä:
  23. Ä":
  24. Ä,:
  25. Ä6$ô Registers used for parameters.
  26. Ä@9margin     =  4  :ô Left margin in tenths of an inch.
  27. ÄJ5threshold  =  5  :ô The logical colour threshold.
  28. ÄT5printmode  =  6  :ô The printmode must be 5 or 7.
  29. Ä^:
  30. Äh:
  31. Ärô Use the BASIC stack.
  32. Ä|&sp         = 13  :ô Stack pointer.
  33. Äŷ:
  34. Ä‘:
  35. ÄŒ7ô Set the minimum and maximum number of parameters.
  36. Ĥ9minparameters = 0 :ô The minimum number of parameters
  37. Ä®9maxparameters = 3 :ô The maximum number of parameters
  38. ĸ:
  39. ÄÂ:
  40. ÄÌã pass% = 0 ¸ 3 ⇦ 3
  41. ÄÖ
  42. P%=start%
  43. Äà[OPT pass%
  44. Äê
  45. EQUD 0
  46. Äô
  47. EQUD 0
  48. Äþ
  49. EQUD 0
  50. Å
  51. EQUD 0
  52. ÅEQUD (moduletitle-start%)
  53. ÅEQUD (modulehelp-start%)
  54. Å&EQUD (keywords-start%)
  55. Å0
  56. EQUD 0
  57. Å:
  58. EQUD 0
  59. ÅD
  60. EQUD 0
  61. ÅN
  62. EQUD 0
  63. ÅX.moduletitle
  64. ÅbEQUS "MiniDumpRM"
  65. Ål
  66. EQUB 0
  67. Åv    ALIGN
  68. ŀ.modulehelp
  69. Å⇩CEQUS "Screen Dump"+½(&09)+"3.00 (05 Dec 1987)  ABACUS TRAINING"
  70. Å“
  71. EQUB 0
  72. Åfi    ALIGN
  73. Ũ
  74. .keywords
  75. ŲEQUS "MiniDump"
  76. ż
  77. EQUD 0
  78. ÅÆ    ALIGN
  79. ÅРEQUD (readparameters-start%)
  80. ÅÚEQUW minparameters
  81. ÅäEQUW maxparameters
  82. ÅîEQUD (badsyntax-start%)
  83. ÅøEQUD (keywordhelp-start%)
  84. Æ
  85. EQUD 0
  86. Æ .badsyntax
  87. ÆSEQUS "Syntax:"+½(&09)+"*MiniDump [<margin> [<threshold> [<printmode>]]]"+½(&0D)
  88. Æ 
  89. EQUB 0
  90. Æ*    ALIGN
  91. Æ4.keywordhelp
  92. Æ>KEQUS "*MiniDump"+½(&09)+"[<margin> [<threshold> [<printmode>]]]"+½(&0D)
  93. ÆH9EQUS ½(&09)+½(&09)+"<margin> between 0 and 79"+½(&0D)
  94. ÆR=EQUS ½(&09)+½(&09)+"<threshold> between 0 and 255"+½(&0D)
  95. Æ\:EQUS ½(&09)+½(&09)+"<printmode> must be 5 or 7"+½(&0D)
  96. Æf
  97. EQUB 0
  98. Æp    ALIGN
  99. Æz.badparameters
  100. Æ☓EQUD &00800100
  101. ƉEQUS "Bad Parameters"
  102. Æ—
  103. EQUB 0
  104. Æ¢    ALIGN
  105. Ƭ.badmargin
  106. ƶEQUD &00800100
  107. ÆÀ,EQUS "<margin> must be between 0 and 79"
  108. ÆÊ
  109. EQUB 0
  110. ÆÔ    ALIGN
  111. ÆÞ.badthreshold
  112. ÆèEQUD &00800100
  113. Æò0EQUS "<threshold> must be between 0 and 255"
  114. Æü
  115. EQUB 0
  116. Ç    ALIGN
  117. Ç.badprintmode
  118. ÇEQUD &00800100
  119. Ç$,EQUS "<printmode> must be either 5 or 7"
  120. Ç.
  121. EQUB 0
  122. Ç8    ALIGN
  123. ÇB    .fail
  124. ÇLCMP R15,#&80000000
  125. ÇVLDMFD (sp)!,{R3-R12,PC}
  126. Ç`.readparameters
  127. ÇjSTMFD (sp)!,{R3-R12,R14}
  128. ÇtMOV margin,#margindefault
  129. Ç~#MOV threshold,#thresholddefault
  130. Ç⇦#MOV printmode,#printmodedefault
  131. Ç‹
  132. MOV R3,R1
  133. dž
  134. MOV R1,R0
  135. ǦADR R0,badparameters
  136. ǰ
  137. CMP R3,#0
  138. ǺBEQ storeparameters
  139. ÇÄSWI "OS_ReadUnsigned"
  140. ÇÎ BVS fail
  141. ÇØADR R0,badmargin
  142. ÇâCMP R2,#79
  143. Çì BGT fail
  144. ÇöMOV margin,R2
  145. È
  146. CMP R3,#1
  147. È
  148. BEQ storeparameters
  149. ÈSWI "OS_ReadUnsigned"
  150. È BVS fail
  151. È(ADR R0,badthreshold
  152. È2CMP R2,#255
  153. È< BGT fail
  154. ÈFMOV threshold,R2
  155. ÈP
  156. CMP R3,#2
  157. ÈZBEQ storeparameters
  158. ÈdSWI "OS_ReadUnsigned"
  159. Èn BVS fail
  160. ÈxADR R0,badprintmode
  161. Èŵ
  162. CMP R2,#5
  163. È… BLT fail
  164. È„
  165. CMP R2,#7
  166. È  BGT fail
  167. Ȫ
  168. CMP R2,#6
  169. È´ BEQ fail
  170. ȾMOV printmode,R2
  171. ÈÈ.storeparameters
  172. ÈÒMOV R0,margin
  173. ÈÜMOV R1,threshold
  174. ÈæMOV R2,printmode
  175. ÈðLDMFD (sp)!,{R3-R12,R14}
  176. Èú]
  177. É í pass%
  178. É:
  179. É:
  180. É":
  181. É, end%=P%
  182. É6:
  183. É@:
  184. ÉJ:
  185. ÉT    =end%
  186. É^:
  187. Éh:
  188. ÿ